import request from '@/utils/request'

// 查询变电站信息列表
export function listSubstation(query) {
  return request({
    url: '/substation/substation/list',
    method: 'get',
    params: query
  })
}

// 查询变电站信息详细
export function getSubstation(id) {
  return request({
    url: '/substation/substation/' + id,
    method: 'get'
  })
}

// 新增变电站信息
export function addSubstation(data) {
  return request({
    url: '/substation/substation',
    method: 'post',
    data: data
  })
}

// 修改变电站信息
export function updateSubstation(data) {
  return request({
    url: '/substation/substation',
    method: 'put',
    data: data
  })
}

// 删除变电站信息
export function delSubstation(id) {
  return request({
    url: '/substation/substation/' + id,
    method: 'delete'
  })
}
